package com.senthink.gl.business.domain.entity;

import com.senthink.gl.business.common.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

/**
 * 用户菜单权限实体类
 *
 * @author zooqi@senthink.com
 * @date 2018/03/02
 */
@Entity
@Table(name = "gl_menu_authority")
@Getter
@Setter
public class UserMenuAuthority extends BaseEntity<Long> {

    /**
     * 用户
     */
    @ManyToOne(targetEntity = User.class)
    @JoinColumn(name = "user", referencedColumnName = "id", nullable = false)
    private User user;

    /**
     * 菜单
     */
    @Column(name = "menu", nullable = false)
    private String menu;
}
